<template>
    <div class="fitment-company">
        <div class="col-lg-1 col-md-1 col-sm-1 min-700" style="height: 100%;position: absolute"></div>
        <div class="col-lg-10 col-md-10 col-sm-10 designer-con">
            <h2 style="color: 555">商城精选</h2>
            <hr style="width:50px;height: 5px;background: #F84B4A;margin-bottom: 50px;border: none;float: left">
            <div class="company-con">
                <div class="company-con-con-div" v-for="good in goods">
                    <div style="width: 100%;height: 80%;text-align: center">
                        <img @click="showGoods(good.id)" :src="good.imgsrc" style="width: 95%;height: 98%">
                    </div>
                    <div style="width: 100%;height: 18%">
                        <h3>{{ good.name }}</h3>
                        <p>￥：{{ good.price }}</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<style>
    @media (max-width:700px){
        .company-con-div{

        }
    }
    h3{
        color:#999
    }
    p{
        color:#999
    }
</style>
<script>

    export default{
        data(){
            return{
                goods:''
            }
        },
        components:{

        },
        created(){
            var _this = this;
            this.$http.get('/fit_goods')
                .then(function(res){
                    _this.goods = res.body;
                });
        },
        methods:{
            showGoods:function(id){
                window.location.href = '/goods_detail?id='+id;
            }
        }
    }
</script>
